import request from '@/utils/request'

export const getFenceImg = () => {
  return request({
    url: '/get_current_frame',
    method: 'get'
  })
}
export const getDetectImg = (type) => {
  return request({
    url: `/get_detect_frame?type=${type}`,
    method: 'get'
  })
}
export const getFenceImgCamera = (url) => {
  return request({
    url: `/get_current_frame?monitor_id=${url}`,
    method: 'get'
  })
}
export const postFenceList = (data) => {
  return request({
    url: `/border_detect_realtime`,
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data
  })
}
export const getFenceAlarm = () => {
  return request({
    url: '/border_alarm_realtime',
    method: 'get'
  })
}
export const postPointList = (data) => {
  return request({
    url: '/get_vertex_coordinates',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'post',
    data
  })
}
